<template>
  <div>
    <div v-for="(item, index) in formData" :key="index">
      <FormItem :info="item" v-model="modelValue[item.name]" @update:model-value="modelValueChange"/>
    </div>
  </div>
</template>

<script setup>
import { defineProps } from "vue";
import FormItem from "./formItem/index.vue";
const props = defineProps({
  formData: {
    type: Array,
    default: [],
  },
  modelValue: {
    type: Object,
    default: {},
  },
});
const emit = defineEmits(["update:modelValue"]);
const modelValueChange = (value)=>{
  emit("update:modelValue", value);
}
</script>

<style lang="less" scoped>
</style>